﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace BarcodeLib
{
   public class CouponImage
    {
       public Size CouponSize = new Size(500, 400);
       public static Bitmap DrawTextImage(string title, string fontName, int fontSize,Color drawColor, int imgWidth, int imgHeight, FontStyle style,  Color backgroundColor)
       {

           
           Bitmap b = null;
           b = new Bitmap(imgWidth,imgHeight);
          
           float left = 2.0f;
           float top = 2.0f;
                       using (Graphics g = Graphics.FromImage(b))
                       {
                            g.Clear(backgroundColor);
                           Font drawFont = new Font(fontName, fontSize);
                           SolidBrush drawBrush = new SolidBrush(drawColor);                           
                           // Create point for upper-left corner of drawing.
                           PointF drawPoint = new PointF(left, top);
                          
                           g.DrawString(title, drawFont, drawBrush, drawPoint);//lines are fBarWidth wide so draw the appropriate color line vertically
                           
                           //using (Pen pen = new Pen(Color.Green,3.5f))
                           //{
                           //    //Font drawFont = new Font(fontName,fontSize);
                           //    // SolidBrush drawBrush = new SolidBrush(drawColor);
                           //    // // Create point for upper-left corner of drawing.
                           //    // PointF drawPoint = new PointF(left, top);
                           //    //g.DrawString(title, drawFont, drawBrush, drawPoint);
                             
                           //}//using
                       }//using
           return b;          
          
       }
       public static Image DrawCouponSubTitle(string subTitle)
       {
           return null;
       }
       public static Image DrawCouponDescription(string descripiton)
       {
           return null;
       }
       public static Image DrawCouponLogo(string logoFileName)
       {
           return null;
       }
       public static Image DrawCouponBarcode(string barcodeValue)
       {
           return null;
       }
     
    }
}
